package com.ym.utils.exception.sentinel;

import com.ym.utils.exception.CustomException;
import com.ym.utils.restful.AjaxJson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class FallbackException {
    private final static Logger log = LoggerFactory.getLogger(FallbackException.class);

    public static AjaxJson fallback(Throwable throwable) {
        log.error("{}", throwable);
        return new AjaxJson().ErrorException(new CustomException(500,"接口发生异常了..."));
    }
}
